import request from '@/utils/request'

// 查询学年列表
export function listGrade(query) {
  return request({
    url: '/teach/grade/list',
    method: 'get',
    params: query
  })
}

// 查询学年详细
export function getGrade(gId) {
  return request({
    url: '/teach/grade/' + gId,
    method: 'get'
  })
}

// 新增学年
export function addGrade(data) {
  return request({
    url: '/teach/grade',
    method: 'post',
    data: data
  })
}

// 修改学年
export function updateGrade(data) {
  return request({
    url: '/teach/grade',
    method: 'put',
    data: data
  })
}

// 删除学年
export function delGrade(gId) {
  return request({
    url: '/teach/grade/' + gId,
    method: 'delete'
  })
}
